package com.hyt.it.ogt.controller.ykcj.exam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hyt.common.apiInfor.ParamType;
import com.hyt.it.ogt.controller.base.BaseController;
import com.hyt.it.ogt.ykcj.common.core.domain.AjaxResult;
import com.hyt.it.ogt.ykcj.domain.vo.exchange.CandidateAnswersVO;
import com.hyt.it.ogt.ykcj.service.exchange.IExamineeExamInfoService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiSort;

/**
 * description
 * 考生考试试卷信息Controller
 *
 * @author yaojian
 * @createTime 2021/12/28
 */
@Api(tags = "exam.13.考生考试试卷信息", value = "考生考试试卷信息请求接口")
@ApiSort(value = 133)
@RestController
@RequestMapping("/examineeExamInfo")
public class ExamineeExamInfoController extends BaseController {

    @Autowired
    private IExamineeExamInfoService examineeExamInfoService;


    /**
     * 根据考生id考试id获取考试考试试卷的信息
     *
     * @throws Exception
     */
    @ApiOperation(value = "根据考试id和考生id获取考生考试试卷信息", response = CandidateAnswersVO.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "examId", value = "考试id", paramType = ParamType.PATH, dataType = "String", required = true),
            @ApiImplicitParam(name = "examineeId", value = "考生id", paramType = ParamType.PATH, dataType = "String", required = true)
    })
    @PostMapping(value = "/{examId}/{examineeId}")
    public AjaxResult getExamInfo(@PathVariable(value = "examId",required = true) String examId, @PathVariable(value = "examineeId",required = true) String examineeId) {
        return AjaxResult.success(examineeExamInfoService.getExamInfo(examId, examineeId));
    }


}
